<?php

namespace app\modules\cruise\models;

use Yii;

/**
 * This is the model class for table "room_download".
 *
 * @property int $id
 * @property int $cruise_id 所属邮轮
 * @property string $name 文件名
 * @property string $path 文件存储路径
 * @property int $download_id 下载人id
 * @property int $num 下载次数
 * @property string $remark 备注
 * @property string $down_time 下载时间
 * @property int $status 1正常  2禁用
 * @property int $user_id 管理员编号
 * @property string $created_at
 * @property string $updated_at
 * @property int $template_id 模板类型
 */
class RoomDownload extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'room_download';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['cruise_id'], 'required'],
            [['cruise_id', 'download_id', 'num', 'status', 'user_id', 'template_id'], 'integer'],
            [['down_time', 'created_at', 'updated_at'], 'safe'],
            [['name', 'path'], 'string', 'max' => 255],
            [['remark'], 'string', 'max' => 512],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'cruise_id' => 'Cruise ID',
            'name' => 'Name',
            'path' => 'Path',
            'download_id' => 'Download ID',
            'num' => 'Num',
            'remark' => 'Remark',
            'down_time' => 'Down Time',
            'status' => 'Status',
            'user_id' => 'User ID',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'template_id' => 'Template ID',
        ];
    }
}
